Skip to content

Setup | Fall back to GitHub's API when the release download fails - #5

Merged
felixbeinssen merged 1 commit into
mainfrom
setup-download-fallback
Nov 9, 2026
Merged

felixbeinssen merged 1 commit into
mainfrom
setup-download-fallback

Conversation

@felixbeinssen

Copy link
Copy Markdown
Collaborator

Setup downloads the simulation release from GitHub without credentials. During a GitHub incident, release download links returned 504 to anonymous clients while api.github.com kept serving the same asset, so every new session started without its coding agent.

Changes

Functional changes

A session now gets its coding agent even when GitHub's release download links are failing, as long as GitHub's API is up.

Technical changes

  • setup.sh downloads the release to a file instead of piping into tar. If that fails, it looks up the release by channel (releases/latest for production, releases/tags/prerelease for staging), takes its asset's API URL and downloads it with Accept: application/octet-stream.
  • If the lookup finds no asset, setup stops with a message naming the API URL. Extraction is its own line, so a failed tar still stops setup.
  • The fallback uses GitHub's unauthenticated API, limited to 60 requests per hour per IP. It only runs when the primary link fails.

Testing

  1. Start a session on a task whose base task uses this setup.sh. Setup should print "Coding agent ready."
  2. To exercise the fallback, point the staging URL at a missing file (for example .../download/prerelease/missing.tar.gz) and run setup. It should log a 404, then install from the API and start the agent.
  3. To check the failure message, also point API at a missing tag. Setup should stop with "no release asset found at …".

GitHub's release download links can return 504 to anonymous clients while
api.github.com still serves the same asset. Setup now downloads to a file,
falls back to the API asset endpoint, and stops on a failed extract.
@felixbeinssen
felixbeinssen marked this pull request as ready for review November 9, 2026 08:17
@felixbeinssen
felixbeinssen merged commit b3d28e3 into main Nov 9, 2026
2 checks passed
@felixbeinssen
felixbeinssen deleted the setup-download-fallback branch November 9, 2026 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant